package com.bootcamp.javase.oop.extend;

import java.util.Scanner;

/**
 * @program: ExtendsCode
 * @description:
 * @author: Keyu Li
 * @create: 2021-08-31 19:45
 **/

public class ScannerUtils {
    private static String getStringInput(){
        System.out.println("Input a string!: ");
        Scanner sc = new Scanner(System.in);
        return sc.nextLine();
    }

    private static int getIntInput(){
        System.out.println("Input an integer: ");
        Scanner sc = new Scanner(System.in);
        return Integer.parseInt(sc.nextLine());
    }

    private static Person getPerson(){
        String nn = getStringInput();
        int aa = getIntInput();
        return new Person(aa, nn);
    }
}

class Person{
    private int age;
    private String name;
    public Person(){

    }

    public Person(int age, String name){
        this.age = age;
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }
}

class DemoTest{
    public static void main(String[] args) {
//        Person p = ScannerUtils.
    }
}
